{% extends 'base.html' %}
{% block title %}部署应用{% endblock %}

{% block content %}
<div id="page-wrapper" style="min-height: 421px;">
    <div class="row">
    	<div class="col-lg-12">
         	<h3 class="page-header">自动化部署应用</h3>
            <form action="/deploy/app_deploy/" method="get" role="form">
            <div class="col-lg-4">
            	<div class="form-group">
                    <div class="row">
                        <div class="col-lg-8">
                            <label style="color: green">输入IP：</label>
                            <input class="form-control" name="ip_list" placeholder="多个IP以逗号分隔">
                            <input class="btn btn-primary btn-xs" type="submit" value="部署">
                        </div>
                    </div>
                    <div></div>
                    <div class="row">
                        <div class="col-lg-8">
                            <label>----------------------------</label>
                            <label style="color: green">自动化部署应用：</label>
                            <div class="radio">
                                <label>
                                    <input type="radio" name="app" id="optionsRadios1" value="ifconfig"> jdk
                                </label>
                            </div>
                            <div class="radio">
                                <label>
                                    <input type="radio" name="app" id="optionsRadios1" value="hostname"> tomcat
                                </label>
                            </div>
                            <div class="radio">
                                <label>
                                    <input type="radio" name="app" id="optionsRadios1" value="hostname"> nginx
                                </label>
                            </div>
                            <div class="radio">
                                <label>
                                    <input type="radio" name="app" id="optionsRadios1" value="hostname"> redis
                                </label>
                            </div>
                            <div class="radio">
                                <label>
                                    <input type="radio" name="app" id="optionsRadios1" value="hostname"> apache
                                </label>
                            </div>
                            <div class="radio">
                                <label>
                                    <input type="radio" name="app" id="optionsRadios1" value="hostname"> chrony
                                </label>
                            </div>
                            <div class="radio">
                                <label>
                                    <input type="radio" name="app" id="optionsRadios1" value="hostname"> mysql
                                </label>
                            </div>
                            <div class="radio">
                                <label>
                                    <input type="radio" name="app" id="optionsRadios1" value="hostname"> rabbitmq
                                </label>
                            </div>
                            <div class="radio">
                                <label>
                                    <input type="radio" name="app" id="optionsRadios1" value="hostname"> ntp
                                </label>
                            </div>
                            <div class="radio">
                                <label>
                                    <input type="radio" name="app" id="optionsRadios1" value="hostname"> vsftp
                                </label>
                            </div>
                        </div>
                    </div>
            	</div>
            </div>
            <div class="col-lg-8">
                <div class="form-group">
                    <label style="color: green">执行结果：</label>
                    <textarea rows="24" style="background-color: black;color: green" class="form-control">{% for key, value in app_deploy_result.items %}
{{ key }}:
-------------------------{% for i in value.values %}
Comment:    {{ i.comment }}
Result:         {{ i.result }}
Pid:            {{ i.changes.pid }}
Retcode:        {{ i.changes.retcode }}
stderr:         {{ i.changes.stderr }}
stdout:
{{ i.changes.stdout }}
-------------------------{% endfor %}
################################################################
{% endfor %}</textarea>
                </div>
            </div>
            </form>
		</div>
	</div>
</div>
{% endblock %}